/*    */ package com.zimbra.cs.filter.jsieve;
/*    */ 
/*    */ import com.zimbra.cs.filter.ZimbraMailAdapter;
/*    */ import java.util.ArrayList;
/*    */ import java.util.Iterator;
/*    */ import java.util.List;
/*    */ import java.util.Set;
/*    */ import org.apache.jsieve.SieveContext;
/*    */ import org.apache.jsieve.exception.SieveException;
/*    */ import org.apache.jsieve.mail.MailAdapter;
/*    */ import org.apache.jsieve.tests.Header;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class MimeHeaderTest
/*    */   extends Header
/*    */ {
/*    */   protected boolean match(MailAdapter mail, String comparator, String matchType, List headerNames, List keys, SieveContext context)
/*    */     throws SieveException
/*    */   {
/* 43 */     if (!(mail instanceof ZimbraMailAdapter)) {
/* 44 */       return false;
/*    */     }
/* 46 */     ZimbraMailAdapter zma = (ZimbraMailAdapter)mail;
/*    */     
/* 48 */     boolean isMatched = false;
/* 49 */     Iterator<String> headerNamesIter = headerNames.iterator();
/* 50 */     while ((!isMatched) && (headerNamesIter.hasNext())) {
/* 51 */       Set<String> values = zma.getMatchingHeaderFromAllParts((String)headerNamesIter.next());
/* 52 */       isMatched = match(comparator, matchType, new ArrayList(values), keys, context);
/*    */     }
/* 54 */     return isMatched;
/*    */   }
/*    */ }


/* Location:              /home/mint/zimbrastore.jar!/com/zimbra/cs/filter/jsieve/MimeHeaderTest.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       0.7.1
 */